#include<memory>
#include<iostream>
#include<vector>
using namespace std;
char buffer[1024];
#define MAX(x,y) ((x>y)?x:y)
class A {
public:
	int a;

	void* operator new (size_t size) {
		return buffer;
	}
	void operator delete (void* ptr) {
		std::cout << *((int*)buffer) << std::endl;
	}
};


class Test {
	char a;
	char buffer[16];
	char b;
};
class Test1 {
	char a;
	Test t;
	
};
using func = void(int);
void f(int a) {
	std::cout << a << std::endl;
}
int main() {
	std::cout << MAX(2,2)<< std::endl;

	func* ff = f;
	ff(1);
	vector<int>vec;
	std::cout << vec.size() << " " << vec.capacity() << std::endl;
	//vec.reserve(10);
	//std::cout << vec.size() << " " << vec.capacity() << std::endl;
	///*std::cout << vec[0] <<std::endl;*/
	//std::cout << *vec.begin() << std::endl;
	vec.resize(5);
	std::cout << vec.size() << " " << vec.capacity() << std::endl;

	std::cout << sizeof(Test1) << std::endl;
	A* a = new A();
	a->a = 123456;
	delete a;

	shared_ptr<int>sp(new int(25));
	std::cout << *sp << std::endl;
	shared_ptr<int>sp1 = std::move(sp);
	std::cout << *sp << std::endl;
	std::cout << *sp1 << std::endl;

}